#ifndef ADDDEVICEINFO_H
#define ADDDEVICEINFO_H

#include <QDialog>
#include "addDevice.h"
#include "device.h"
#include "devicedao.h"
//#include "mainwindow.h"
//#include "toponodelabel.h"
#include "dbutil.h"
#include <QGraphicsView.h>
class AddDeviceDialog : public QDialog
{
    Q_OBJECT
public:
    explicit AddDeviceDialog(QWidget *parent = 0, int mostUpId = -1, int deviceId = -1, int deviceType = -1,
                             const QString &subsetIp = "", const QString &subsetMask = "");
    ~AddDeviceDialog();
    AddDevice_Dialog *addDeviceDialog;
    void getAddDeviceFormUi();
    void initAddDeviceDialog();
    bool validIp(QString str);
    bool validMac(QString str);
    void IpWrite();
    void MacWrite();
signals:

public slots:
    void on_addButton_clicked();
    void on_selectButton_clicked();
private:
    Device *device;
    int selectedDeviceId;
    int selectedDeviceType;
    int mostUpDeviceId;
    //MainWindow1 *mainWindow;
    //TopoNodeLabel *label;
    QString mostUpSubsetIp;
    QString mostUpSubsetMask;
};

#endif // ADDDEVICEINFO_H
